home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / incl52.lzh / stdlib.h < prev    next >
C/C++ Source or Header  |  1991-05-22  |  2KB  |  96 lines

  1. /* Copyright 1989 Manx Software Systems, Inc. All rights reserved */
  2.  
  3. #ifndef __STDLIB_H
  4. #define __STDLIB_H
  5.  
  6. # ifndef _SIZE_T
  7. # define _SIZE_T
  8.   typedef unsigned long size_t;
  9. # endif
  10.  
  11. #ifndef _WCHAR_T
  12. #define _WCHAR_T
  13. typedef char wchar_t;
  14. #endif
  15.  
  16. # ifndef ERANGE
  17. #define ERANGE 13
  18. # endif
  19.  
  20. #ifndef NULL
  21. #define NULL ((void *)0)
  22. #endif
  23.  
  24. #define EXIT_FAILURE (-1)
  25. #define EXIT_SUCCESS 0
  26.  
  27. #ifndef HUGE_VAL
  28. #ifdef _FLT_FFP
  29. #define HUGE_VAL    9.22337177E+17
  30. #else
  31. #define HUGE_VAL    1.797693134862316E+308
  32. #endif
  33. #endif
  34.  
  35. #define RAND_MAX 32767
  36.  
  37. #define    MB_CUR_MAX    1
  38. #ifndef MB_LEN_MAX
  39. #define    MB_LEN_MAX    1
  40. #endif
  41.  
  42. typedef struct {
  43.     int quot;
  44.     int rem;
  45. } div_t;                        /* quotient and remainder for div() */
  46.  
  47. typedef struct {
  48.     long quot;
  49.     long rem;
  50. } ldiv_t;                        /* quotient and remainder for ldiv() */
  51.  
  52. double atof(const char *_nptr);
  53. int atoi(const char *_nptr);
  54. long int atol(const char *_nptr);
  55. double strtod(const char *_nptr, char **_endptr);
  56. long int strtol(const char *_nptr, char **_endptr, int _base);
  57. unsigned long int strtoul(const char *_nptr, char **_endptr, int _base);
  58.  
  59. int rand(void);
  60. void srand(unsigned int _seed);
  61.  
  62. void *calloc(size_t _nmemb, size_t _size);
  63. void free(void *_ptr);
  64. void *malloc(size_t _size);
  65. void *realloc(void *_ptr, size_t _size);
  66.  
  67. void abort(void);
  68. int atexit(void (*_func)(void));
  69. void exit(int _status);
  70. char *getenv(const char *_name);
  71. int system(const char *_string);
  72.  
  73. void *bsearch(const void *_key, const void *_base, size_t _nmemb, size_t _size,
  74.                                 int (*_compar)(const void *, const void *));
  75. void qsort(void *_base, size_t _nmemb, size_t _size,
  76.                                 int (*_compar)(const void *, const void *));
  77.  
  78. int abs(int _j);
  79. div_t div(int _numer, int _denom);
  80. long int labs(long int _j);
  81. ldiv_t ldiv(long int _numer, long int _denom);
  82.  
  83. int mblen(const char *_s, size_t _n);
  84. int mbtowc(wchar_t *_pwc, const char *_s, size_t _n);
  85. int wctomb(char *_s, wchar_t _wchar);
  86. size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);
  87. size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);
  88.  
  89. #if !__STDC__
  90. /* non ANSI C functions */
  91. void ftoa(double _val, char *_buf, int, int);
  92. long double strtold(const char *_nptr, char **_endptr);
  93. #endif    /* !__STDC__ */
  94.  
  95. #endif    /* _STDLIB_H */
  96.